Repository navigation
feat(keyless): pure RFC 9421 HTTP Message Signatures core (Pillar 2 keyless step 1) - #322
Merged
Merged
Conversation
…eyless step 1) First increment of the "sign, don't store" keyless-credential story: a deterministic, zero-I/O core that builds the RFC 9421 signature base and assembles/verifies the Signature-Input + Signature headers. - src/keyless/http-sig.ts: componentValue (@method/@authority/@path/@query/ @scheme/@target-uri + header components), signatureParamsValue, signatureBase (§2.5), signRequest, verifyRequest. Signing/verifying take injected sign/ resolvePub/verify callbacks so the same primitive serves the broker (Ed25519 signWithIdentity) and tests (ephemeral keypair). No filesystem, no network, no identity import, no model calls — stays inside the zero-LLM boundary and verifies offline across machines. - Fail-closed: missing covered component, unresolvable keyid, expired signature, alg != ed25519, uncovered required component, or a base that doesn't verify all return valid:false. Nothing but valid:true is proof of identity. - 17 unit tests: component derivation, base/param serialization determinism, sign+verify round-trip, and tamper/expiry/unknown-keyid/required-component rejection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
✅ Docker image built successfully
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First increment of the "sign, don't store" keyless-credential story (design note: kit-research #39). Instead of carrying a long-lived bearer token, an agent signs each outbound request with its Ed25519 identity (Pillar 1); the server verifies against the public key — nothing at rest to steal, rotate, or redact.
What
src/keyless/http-sig.ts— the deterministic, zero-I/O RFC 9421 core:componentValue— derives@method/@authority/@path/@query/@scheme/@target-uriand header components (case-insensitive, OWS-trimmed).signatureParamsValue+signatureBase— the canonical@signature-paramsvalue and the §2.5 signature base, byte-for-byte stable across machines.signRequest→{ Signature-Input, Signature };verifyRequest→ fail-closedVerifyResult.sign/resolvePub/verifycallbacks, so the same primitive serves the broker (Ed25519signWithIdentity, wired in step 2) and tests (ephemeral keypair). No filesystem, no network, no identity import, no model calls — stays inside the zero-LLM boundary and verifies offline.Fail-closed
Missing covered component, unresolvable keyid, expired signature,
alg != ed25519, an uncoveredrequiredcomponent, or a base that doesn't verify all returnvalid:false. Nothing butvalid:trueis proof of identity.Verification
npx tsc --noEmitclean ·npx eslint src0 errors (124 pre-existing warnings)node scripts/test.mjs— 2758/2758 pass, 0 fail · prettier appliedNext: step 2 wires this into the exec-broker egress path (a
signhost mints these headers from the identity instead of injecting a stored bearer) + akit doctorkeyless-posture row.🤖 Generated with Claude Code
Generated by Claude Code